#ifndef CX_DEBUG_H
#define CX_DEBUG_H
#include "cx_typedef.h"
#include "cx_list.h"
#include "cx_format.h"
#include <stdio.h>
#include <string.h>
#define PUTC_ENABLED
typedef struct cx_debug_variable
{
#ifndef USE_DYNAMIC_MALLOC
    cx_list_item_t *next;
#endif
    const char *name;
    cx_datatype_t type;
    void * pdata;
}cx_debug_variable_t;
typedef struct cx_debug_command
{
#ifndef USE_DYNAMIC_MALLOC
    cx_list_item_t *next;
#endif
    const char *name;
    cx_cb_func_t handler;
}cx_debug_command_t;
char * getStringField(char *dst, char *src);
cx_err_t cx_debug_addVariable(cx_debug_variable_t *var);
cx_err_t cx_debug_addCommand(cx_debug_command_t *cmd);
cx_err_t cx_debug_handler(char *input);
#endif
